package com.example.api.mapper;

import com.example.api.pojo.User;
import com.example.api.query.UserQuery;
import com.example.api.vo.UserVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    List<UserVO> find(UserQuery userQuery);

    void add(User user);

    UserVO login(@Param("loginName") String loginName, @Param("password") String password);

    void update(User user);

    //@Delete("delete from t_user where id = #{id}")
    void deleteById(long id);

    long findCount(UserQuery userQuery);
}
